<#include "../inc/view.html"/>
<@view>
            <form id="menuAddForm${nowtime}" name="menuAddForm" class="form-horizontal" action="/admin/albumCate/save" method="post" data-validator-option="{theme:'yellow_top'}">
                <input type="hidden" name="albumCate.id" value="${(po.id)!}">
                <input type="hidden" name="albumCate.parentid" value="${(po.parentid)!(parentid)!}">
                <input type="hidden" name="albumCate.levelno" value="${(po.levelno)!levelno!1}">
            <div class="row">
                <div class="col-sm-6">
                    <ol class="breadcrumb">
                        <li>
                            <b>系统</b>
                        </li>
                        <li>
                            <a href="javascript:void(0);" onclick="contentLoadPage('/albumCate')">相册类别</a>
                        </li>
                        <li class="active">
                            <#if po??>修改
                                <#else>新增
                            </#if>
                        </li>
                    </ol>
                </div>
                <div class="col-sm-6">
                    <a onclick="contentLoadPage('/albumCate')" class="btn-sm btn-white pull-right" style="margin-left:10px;"><i class="ti-arrow-left"></i>返回</a>
                    <button type="submit" class="btn-sm btn-success pull-right"><i class="ti-save"></i>保存</button>
                </div>
            </div>
            <hr>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">中文名称</label>
                            <div class="col-md-10">
                                <input type="text" class="form-control" name="albumCate.name" data-rule="中文名称:required" value="${(po.name)!}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">英文名称</label>
                            <div class="col-md-10">
                                <input type="text" class="form-control" name="albumCate.en_name" data-rule="英文名称:required" value="${(po.en_name)!}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">编码</label>
                            <div class="col-md-10">
                                <input type="text" class="form-control" name="albumCate.code" data-rule="编码:required" value="${(po.code)!}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">排序</label>
                            <div class="col-md-10">
                                <input type="text" class="form-control" name="albumCate.sort" data-rule="排序:required" value="${(po.sort)!1}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">简述</label>
                            <div class="col-md-10">
                                <script id="editor${nowtime}" type="text/plain" name="albumCate.summary" style="width:99%;height:500px;">${(po.summary)!}</script>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-md-2 control-label">状态</label>
                            <div class="col-md-10">
                                <label><input type="radio" name="albumCate.status" value="1" <#if 1==(po.status)!0 >checked</#if> /> 启用</label>
                                <label><input type="radio" name="albumCate.status" value="0" <#if 2==(po.status)!0 >checked</#if> />禁用</label>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
</@view>
<script>
    $(function(){
        var ue = UE.getEditor('editor${nowtime}');
        ajaxForm($("#menuAddForm${nowtime}"),function(json){
            if(json.code==RESULT_SUCCESS){
                contentLoadPage('/albumCate');
            }else{
                if(json.msg)
                    layer.alert(json.msg,{icon:5,title:'系统提示',shadeClose:true});
            }
        });
    });
</script>